public class Test {
    public static void main(String[] args) {
        int count=0;//计数
        for (int i = 1; i <100 ; i++) {
            if(i%10==9){//判断个位的9
                count++;
                System.out.print(i+" ");
            }
            if(i/10==9){//判断十位的9
                count++;
                System.out.print(i+" ");

            }
        }
        System.out.println();
        System.out.println("count="+count);
    }
}
